<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <script>
        // 声明变量
        let a;
        let b, c, d;
        let e = 100;
        let f = 'iloveyou';
        h = [];

        // 1.变量不能重复声明
        // let star = 'luo';
        // let star = 'xiaozhu';

        // 2.块级作用域  全局，函数，eval
        // {
        //     let girl = 'zhou';
        // }
        // console.log(girl);

        // 3.不存在变量提升
        console.log(song);
        let song = 'linai';

        // 4.不影响作用域链
        {
            let school = '尚硅谷';
            function fn() {
                console.log(school);
            }
        }
    </script>
</body>

</html>